package com.hsteach.dao.domain.activity;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hsteach.common.annotation.Excel;
import com.hsteach.common.core.domain.BaseEntity;
import com.hsteach.web.controller.activity.dto.ActivityFileDto;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 活动列表对象 tb_activities
 * 
 * @author ruoyi
 * @date 2023-07-07
 */
@Data
public class Activities extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 活动内容 */
    @Excel(name = "活动内容")
    private String context;

    /** 机构号 */
    @Excel(name = "机构号")
    private String orgCode;

    /** 创建人名称 */
    @Excel(name = "创建人名称")
    private String createByName;

    /** 创建人id */
    @Excel(name = "创建人id")
    private String personId;

    /** 性别 */
    @Excel(name = "性别")
    private String sex;

    /** 状态 1正常 0删除 */
    @Excel(name = "状态 1正常 0删除")
    private Integer status;

    /** 名额 */
    @Excel(name = "名额")
    private Long enrollTotal;

    /** 报名人数 */
    @Excel(name = "报名人数")
    private Long enrollNum;

    /** 报名开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "报名开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date enrollBegin;

    /** 报名结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "报名结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date enrollEnd;

    // 1未开始，2报名中，3已结束
    private Integer curStatus;

    private List<String> imgs;

    private List<ActivityFileDto> files;

    private List<ActivityClass> classes;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("context", getContext())
            .append("createBy", getCreateBy())
            .append("createByName", getCreateByName())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("enrollTotal", getEnrollTotal())
            .append("enrollNum", getEnrollNum())
            .append("enrollBegin", getEnrollBegin())
            .append("enrollEnd", getEnrollEnd())
            .toString();
    }
}
